package com.ylr.blog.framework.mq;

import com.ylr.blog.common.bo.publish_blog.PublishBlogBo;
import com.ylr.blog.framework.service.BlogService;
import lombok.AllArgsConstructor;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

/**
 * Created by IntelliJ IDEA.
 *
 * @author wyw
 * date: 2023-06-08 11:14:46
 * className: PublishBlogListener
 * version: 1.0
 * description:
 */
@Component
@AllArgsConstructor
public class PublishBlogListener {

    private static final Logger log = LoggerFactory.getLogger(PublishBlogListener.class);

    private final BlogService blogService;

    @RabbitListener(queues = "publish.blog.queue")
    public void publishBlogListener(PublishBlogBo publishBlogBo) {

        // 1、查询博客数据

        // 2、上传elasticsearch

    }
}
